<?php
  mysql_connect("localhost","root","");
            mysql_select_db("susudo");

            /*
            $profile_query="SELECT * FROM `users_profile` WHERE user_id=2";
            $profile= mysql_fetch_assoc(mysql_query($profile_query));

            $user_query="SELECT * FROM `users` WHERE id=2";
            $user= mysql_fetch_assoc(mysql_query($user_query));
            */
            $user_profile_query="SELECT * FROM users JOIN users_profile ON users.id = users_profile.user_id WHERE users.id=$user_id";
            $user_profile= mysql_fetch_assoc(mysql_query($user_profile_query));


          /*  echo "<pre>";
            print_r($user_profile);
            echo "</pre>";*/
            mysql_close(); 
?>
